]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
appDisplay: Handle null value
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 13 Aug 2021 01:09:51 +0000 (03:09 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Fri, 13 Aug 2021 13:16:54 +0000 (15:16 +0200)
The value can not actually be null at that point, but it's too
hard to spot for tools like coverity:
 - before setting view, we chain up to the parent's acceptDrop()
 - that calls _canAccept(), which we override and check for the view

Still, and extra ? doesn't hurt, and hopefully will make the tooling
happy.

CID 351269

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1950>

js/ui/appDisplay.js

index 3673c8541633d107917cd17d1d676ea205420c97..a3e60b834f3bdef080f56ae1dd28375f8d89d490 100644 (file)
@@ -3399,7 +3399,7 @@ var AppIcon = GObject.registerClass({
         let view = _getViewFromIcon(this);
         let apps = [this.id, source.id];
 
-        return view.createFolder(apps);
+        return view?.createFolder(apps);
     }
 
     cancelActions() {